package concurrency.chapter7;

/**
 * @author honway.liu
 * @date 2019-06-06 23:19
 * @email gm100861@gmail.com
 * @blog http://linuxsogood.org
 * 自定义一个锁实现
 */
public interface Lock {

    class TimeOutException extends Exception {
        public TimeOutException(String message) {
            super(message);
        }
    }

    void lock();

    void lock(long timeout) throws TimeOutException;

    void unlock();


}
